import request from "@/utils/request";
export function getWorkPatternsApi() {
  return request({
    method: "get",
    url: `/work-patterns/all`,
  });
}

//分页查询排班
export function getWorkSchedulingsApi(params) {
  return request({
    method: "get",
    url: `/work-schedulings`,
    params,
  });
}

//工作模式分页查询
export function getWorkPageApi(params) {
  return request({
    method: "get",
    url: `/work-patterns/page`,
    params,
  });
}

//添加工作模式
export function postWorkPageApi(data) {
  return request({
    method: "post",
    url: `/work-patterns`,
    data,
  });
}

//删除工作模式
export function delWorkPageApi(id) {
  return request({
    method: "DELETE",
    url: `//work-patterns/${id}`,
  });
}

//根据工作模式id获取工作模式详情
export function getWorkinfoApi(id) {
  return request({
    method: "get",
    url: `/work-patterns/${id}`,
  });
}

//修改工作模式
export function PUTWorkinfoApi(data) {
  return request({
    method: "PUT",
    url: `/work-patterns`,
    data,
  });
}

//人工调整
export function PUTworkSchedulingsApi(data) {
  return request({
    method: "PUT",
    url: `/work-schedulings`,
    data,
  });
}